package com.ougy.reshop.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
public class Shop {
	private int sid;

	private User user;

	private String shop_name;

	private byte shop_type;

	private String shop_telephone;
	private String shop_qq;
	private String shop_msn;
	private String shop_address;

	private int shop_status;

	private Accessory shop_logo;
	private Accessory shop_banner;
	private Accessory card;
	
	private byte readed;
	
	private List<Goods> good_list=new ArrayList();
	private int shop_credit;
	private String violation_reseaon;

	private String shop_seo_keywords;
	private String shop_seo_description;
	private String shop_info;
	
	private String shop_second_domain;
	
	private int domain_modify_count;
	
	private int favorite_count;
	
	private ShopPoint point;

	@Id
	@GeneratedValue
	public int getSid() {
		return sid;
	}

	public void setSid(int sid) {
		this.sid = sid;
	}
	
	@OneToOne
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getShop_name() {
		return shop_name;
	}

	public void setShop_name(String shop_name) {
		this.shop_name = shop_name;
	}

	public byte getShop_type() {
		return shop_type;
	}

	public void setShop_type(byte shop_type) {
		this.shop_type = shop_type;
	}

	public String getShop_telephone() {
		return shop_telephone;
	}

	public void setShop_telephone(String shop_telephone) {
		this.shop_telephone = shop_telephone;
	}

	public String getShop_qq() {
		return shop_qq;
	}

	public void setShop_qq(String shop_qq) {
		this.shop_qq = shop_qq;
	}

	public String getShop_msn() {
		return shop_msn;
	}

	public void setShop_msn(String shop_msn) {
		this.shop_msn = shop_msn;
	}

	public String getShop_address() {
		return shop_address;
	}

	public void setShop_address(String shop_address) {
		this.shop_address = shop_address;
	}

	public int getShop_status() {
		return shop_status;
	}

	public void setShop_status(int shop_status) {
		this.shop_status = shop_status;
	}
	@OneToOne
	public Accessory getShop_logo() {
		return shop_logo;
	}

	public void setShop_logo(Accessory shop_logo) {
		this.shop_logo = shop_logo;
	}
	@OneToOne
	public Accessory getShop_banner() {
		return shop_banner;
	}

	public void setShop_banner(Accessory shop_banner) {
		this.shop_banner = shop_banner;
	}
	@OneToOne
	public Accessory getCard() {
		return card;
	}

	public void setCard(Accessory card) {
		this.card = card;
	}

	
	public byte getReaded() {
		return readed;
	}

	public void setReaded(byte readed) {
		this.readed = readed;
	}
	@OneToMany(mappedBy="shop")
	public List<Goods> getGood_list() {
		return good_list;
	}

	public void setGood_list(List<Goods> good_list) {
		this.good_list = good_list;
	}

	public int getShop_credit() {
		return shop_credit;
	}

	public void setShop_credit(int shop_credit) {
		this.shop_credit = shop_credit;
	}
	@Lob
	@Column(columnDefinition="LongText")
	public String getViolation_reseaon() {
		return violation_reseaon;
	}

	public void setViolation_reseaon(String violation_reseaon) {
		this.violation_reseaon = violation_reseaon;
	}
	@Lob
	@Column(columnDefinition="LongText")
	public String getShop_seo_keywords() {
		return shop_seo_keywords;
	}

	public void setShop_seo_keywords(String shop_seo_keywords) {
		this.shop_seo_keywords = shop_seo_keywords;
	}
	@Lob
	@Column(columnDefinition="LongText")
	public String getShop_seo_description() {
		return shop_seo_description;
	}

	public void setShop_seo_description(String shop_seo_description) {
		this.shop_seo_description = shop_seo_description;
	}
	@Lob
	@Column(columnDefinition="LongText")
	public String getShop_info() {
		return shop_info;
	}

	public void setShop_info(String shop_info) {
		this.shop_info = shop_info;
	}

	public String getShop_second_domain() {
		return shop_second_domain;
	}

	public void setShop_second_domain(String shop_second_domain) {
		this.shop_second_domain = shop_second_domain;
	}
	@Column(columnDefinition="int default 0")
	public int getDomain_modify_count() {
		return domain_modify_count;
	}

	public void setDomain_modify_count(int domain_modify_count) {
		this.domain_modify_count = domain_modify_count;
	}
	@Column(columnDefinition="int default 0")
	public int getFavorite_count() {
		return favorite_count;
	}

	public void setFavorite_count(int favorite_count) {
		this.favorite_count = favorite_count;
	}
	@OneToOne(mappedBy="shop")
	public ShopPoint getPoint() {
		return point;
	}

	public void setPoint(ShopPoint point) {
		this.point = point;
	}
	
	
}
